import java.util.Objects;

public class GraphicTools {
    private int num ;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GraphicTools that = (GraphicTools) o;
        return num == that.num;
    }

    @Override
    public int hashCode() {
        return Objects.hash(num);
    }

    public static void printRectangle(int row, int column, char ch){
        if(row <= 0){
            throw new IllegalArgumentException("行数必须是正整数");
        }
        if(column <= 0){
            throw new IllegalArgumentException("列数必须是正整数");
        }
        if(ch > 126 || ch < 33){
            throw new IllegalArgumentException("字符必须是可见字符！");
        }
        for(int i = 0; i < row; i++){
            for(int j = 0; j < column; j++){
                System.out.print(ch);
            }
            System.out.println();
        }
    }
}
